One or more aspects relate, in general, to processing within a computing environment, and in particular, to facilitating such processing.
Processing within a computing environment includes accessing memory, including main memory and memory caches, to read or store data. The updating of such data is complex in computing environments that include multiple processors having access to the data to be updated. In such multi-processor computing environments, it is common for the computer hardware to have an atomic update instruction, such as a compare and swap (CS) instruction, which attempts to update a field to a new value after having fetched the current value of the field. While blocking other processors from performing the same function at the same time, the compare compares an old value with the current value. If the old value is equal to the current value, then the current value is replaced with the new value. If the old value is not equal to the current value, then the new value is not stored and the user is informed, via a condition code, that the value was not updated and processing loops back to manipulate the current value.
In order for the compare and swap to compare and update the field, it brings the field into a private cache of the local processor and invalidates it from the private caches of other processors. This causes address delays which degrades performance. The more frequently the field is updated, the more degradation.
One approach to minimize this overhead is to update unique individual processor related fields, such as counters, which removes the conflict between the processors. The current values are requested on a periodic basis by a reader or monitoring program, and based on the request, the values are aggregated and the results are provided. This greatly reduces the overhead. However, this adds complexity, and there are cases where the counters already existed and providing a service to aggregate the processor related values is impractical, if not impossible.